package com.wu.dms.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wu.dms.dao.entity.SongList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author Cousin
 */
@Mapper
public interface SongListMapper extends BaseMapper<SongList> {
    @Select("SELECT " +
            "style, COUNT(*) AS styleCount " +
            "FROM music.song_list " +
            "WHERE style IS NOT NULL " +
            "GROUP BY style")
    List<Map<String, Object>> selectAllStatistics();

}
